/**
 * Created by liubin on 2014/12/19.
 */
define(['app', 'notification'], function (app) {
     return app.factory('SmallAlertService', function () {
          var alert = function(title, content, timeout, color, isSmall, icon, links) {
              if(links){
                   // <a href-void class='btn btn-primary btn-sm'>Yes</a> <a href-void class='btn btn-danger btn-sm'>No</a>
                   content = content + "<p class='text-align-right'>" + links + "</p>";
              }
              if(isSmall){
                  $.smallBox({
                      title: title,
                      content: content,
                      color: color,
                      iconSmall: icon,
                      timeout: timeout
                   });
              }
              else {
                  $.smallBox({
                      title: title,
                      content: content,
                      color: color,
                      icon: icon,
                      timeout: timeout
                   });
              }
                //$.SmartMessageBox({
                //    title: "Smart Notification: Buttons",
                //    content: "Lots of buttons to go...",
                //    buttons: '[Need?][You][Do][Buttons][Many][How]'
                //});
          }
          return {
              /**
               * 取消确定按钮的确认框
               * @param title
               * @param content
               * @param callback
               */
               info: function(title, content){
                    alert(title, content, 8000, '#296191', true, 'fa fa-thumbs-up bounce animated');
               }
          }
     });
});